package program.atm.data;

import java.util.ArrayList;
import java.util.List;

/**
 * 银行卡实体.
 *
 * @author 林志鹏
 * @version 1.0.0
 * @date 2020/11/8 14:08
 */
public class Card {

    /**
     * 卡号 16位.
     */
    private String number;

    /**
     * 密码 6位.
     */
    private String password;

    /**
     * 账户余额.
     */
    private int money;

    /**
     * 输错密码次数.
     */
    private int errorCount;

    /**
     * 账号状态 0-启用 1-锁定
     */
    private int status;

    /**
     * 账号收入支出记录.
     */
    private List<String> operationRecod;

    public Card() {
    }

    public Card(String number, String password, int money) {
        this.number = number;
        this.password = password;
        this.money = money;
        this.operationRecod = new ArrayList<>(4);
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getMoney() {
        return money;
    }

    public void setMoney(int money) {
        this.money = money;
    }

    public int getErrorCount() {
        return errorCount;
    }

    public void setErrorCount(int errorCount) {
        this.errorCount = errorCount;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public List<String> getOperationRecod() {
        return operationRecod;
    }

    public void setOperationRecod(List<String> operationRecod) {
        this.operationRecod = operationRecod;
    }

    @Override
    public String toString() {
        return "Card{" +
                "number='" + number + '\'' +
                ", password='" + password + '\'' +
                ", money=" + money +
                ", errorCount=" + errorCount +
                ", status=" + status +
                ", operationRecod=" + operationRecod +
                '}';
    }
}
